<div ng-controller="PhpresourcesCtrl" ng-init="listAction()">
    <ul class="sui-breadcrumb">
        <li>{{'资源'|translate}}</li>
        <li class="active">
            {{"列表"|translate}}
            <!-- <a href="#/phpresources/add" class="sui-btn btn-primary"> +{{'add_new' | translate}} </a> -->
            使用服装店对需要添加的API测试后，再来修改激活。
        </li>
        <span class="sui-form sui-form pull-right">
            <input placeholder="controller" ng-model="controller">
            <button class="sui-btn btn-primary" type="submit" ng-click="getList()">{{'search'|translate}}</button>
        </span>
    </ul>
    <table class="sui-table table-bordered">
        <thead>
            <tr>
                <th></th>
                <th>{{'#'|translate}}</th>
                <th>{{'控制器'|translate}}</th>
                <th>{{'控制器名称'|translate}}</th>
                <th>{{'方法'|translate}}</th>
                <th>{{'方法名称'|translate}}</th>
                <th>{{'卖家权限'|translate}}</th>
                <th>{{'买家权限'|translate}}</th>
                <th>{{'注释'|translate}}</th>
                <th>{{'创建时间'|translate}}</th>
                <th>{{'操作'|translate}}</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="list in resource_list">
                <td>
                <input type="checkbox" name="xzmodel" checklist-model="$parent.xzmodel" checklist-value="list" /> 
                </td>
                <td>{{list.pid}}</td>
                <td>
                    {{list.controller}}
                </td>
                <td>
                    <input ng-model="list.cname" type="text" style="width: 100px">
                </td>
                <td>
                    {{list.action}}
                </td>
                <td>
                    <input ng-model="list.aname" type="text"  style="width: 100px">
                </td>
                <td>
                    <choice ng-model="list.seller" backcall="saveStatu(data,list.pid,'seller')"></choice>
                </td>
                <td>
                    <choice ng-model="list.buyer" backcall="saveStatu(data,list.pid,'buyer')"></choice>
                </td>
                <td>
                    <textarea ng-model="list.note" rows="6" name="note" class="input-xlarge"></textarea>
                </td>
                <td>{{list.created_at | ddtt}}</td>
                <td>
                    <a href="#/phpresources/add?pid={{list.pid}}" class="sui-btn btn-primary">编辑</a>
                    <button ng-show="list.status==0" type="button" class="sui-btn btn-warning" ng-click="StatusUpdate(1,list.pid,list,$event)">{{'激活'|translate}}</button>
                    <button ng-show="list.status==1" type="button" class="sui-btn btn-danger" ng-click="StatusUpdate(0,list.pid,list,$event)">{{'禁用'|translate}}</button>
                </td>
            </tr>
        </tbody>
    </table>
    <!-- 分页start -->
    <pager page-no="1" page-size="pageSize" total="total_count" get-data="getList(pageNo)"></pager>
    <span ng-show="resource_list.length"> 
        <button ng-click="checkAll()" class="sui-btn btn-success"> 全选 </button>
        <button ng-click="nocheckAll()" class="sui-btn btn-success"> 反选 </button> 
        <button ng-click="batchSaveData()" class="sui-btn btn-primary"> 保存 </button> 
    </span>
    <!-- 分页end -->
</div>